module.exports = function($scope, $modal, $resource, toaster){
    
    $scope.load = function(){
        $resource('/api/as/puc/subsidycount/getSyncInfoList', {}, {}).save({}, function(res){
            if(res.errcode === 0){
				$scope.list = res.data;
            } else {
                toaster.error({title: '', body: '获取数据失败'});
            }
        });
	};
	$scope.load();

	//按企业分组查询
    $scope.detail = function(obj){
    	var modalInstance = $modal.open({
			template: require('../views/subsidysyncinfo.html'),
			controller: 'subsidysyncinfo',
			size: 'lg',
			resolve: {
				obj : function () {
					return obj;
				}
			}
		});
	};

    
};